import request from "@/util/request";

export const getDocListByPage = (ebookId: any) => {
  return request({
    url: `/api/doc/allList/${ebookId}`,
    method: "get",
  });
};

export const editDoc = (obj: any) => {
  return request({
    url: "/api/doc/save",
    method: "post",
    data: obj,
  });
};

export const removeDoc = (id: any) => {
  return request({
    url: "/api/doc/remove",
    method: "delete",
    params: {
      ids: id,
    },
  });
};

export const findContentById = (id: any) => {
  return request({
    url: `/api/doc/findContentById/${id}`,
    method: "get",
  });
};

export const docVote = (id: any) => {
  return request({
    url: `/api/doc/vote/${id}`,
    method: "get",
  });
};
